home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Modeling the Dream
/
Modeling the Dream CD - Walkthroughs and Flybys II (1994)(Waite Group).iso
/
spacebar
/
kohtz.txt
< prev
next >
Wrap
Text File
|
1994-08-23
|
8KB
|
432 lines
set maxcall on
set swappath "c:\temp"
init
localise
kohtz
terminate
init:
video l
global cr chr(10)$chr(13)
global ext ""
local trip 1 ;does the sound play?, set to false
. chdir(@c$"\\bigdemo")
opengl @c$"\bigdemo\bigdemo.ovr"
load midpak
@midpak verify
closegl
if !@0
text "The MIDPAK.COM driver is not loaded!"$@cr
text "Press any key to return to DOS."
wait
exit
endif
if !envdef(c)
text "No C environment variable! "@cr
text "To run BIGDEMO from DOS use GO.BAT"@cr
wait
exit
endif
when ESC goto terminate
set fs open(@t$"\mtd\midpak.adv") ;How big is MIDPAK.ADV
local advsize size(@fs) ;stick it in ADVSIZE
. close(@fs)
databegin ;sizes of the wave drivers
"44836"
"10590"
"10816"
"10590"
"7178"
"10590 "
"39859"
"end"
dataend
local x @ ;grab first item into var
advhop:
if @x!="end"
if @x==@advsize
text "Using wave table synthesis for MIDI"@cr
set ext ".gen"
goto advdone
else
local x @
goto advhop
endif
endif
text "Using frequency modulation (FM) MIDI files"@cr
set ext ".opl"
advdone:
opengl @c$"\bigdemo\bigdemo.ovr"
load midpak.grp digpak.grp ;load grps
closegl
if !@0
text "Error loading GRP files"
wait
exit
else
text "GRPs loaded..."$@cr
endif
. chdir(@c$"\\bigdemo")
load "_laser.raw"
digpak preloaded @_laser
digpak play
tt:
digpak done
if !@0
set trip 0
goto tt
endif
free laser
if @trip
text "Sound didn't play!!!!"@cr
wait
exit
else
text "Sound appears to be playing correctly"@cr
endif
midpak volume 100 ;MIDPAK driver has internal vol control
;mixer levels for MIDI!!!
text "Press Enter to start now"@cr@cr@cr
text "At runtime pressing Enter will advance"@cr@cr@cr
text "Press Esc at anytime to terminate"@cr@cr@cr
text "Pausing for 10 seconds"
flushkey
mark 10
wait 100
text "."
waitkey 0
getkey k name
if @k==return
return
endif
loop
return ;--------------- end of init
localise: ;subroutine checks for flics on hd
;and copies them if possible.
local ax 0 bx 0 cx 0 freebytes 0 chcnt 0 chfile " " downed 0
local runcd 0
. chdir(@t$"\\mtdtemp")
global fromcd 0
int 0x21 0x3600,,,0x0000 ;default drive
if @ax==0xffff
text "Problem getting free disk space"
pause
exitnow
endif
set freebytes (@ax*@bx*@cx)/1000
if @freebytes>=60000
set enuf 0
else
set enuf 1
endif
color 0
clearscr
color 15
window
databegin ckl
loctop:
. chdir(@t$"\\mtdtemp")
set chfile @
if @chfile<>"end"
local temp open(@chfile)
if @temp
local success close(@temp)
else
; text @chfile$": file not found"$@cr
set downed 1
endif
goto loctop
endif
. chdir(@t$"\\mtd")
if @downed==0
text 0 0 "The requisite files have been found in MTDTEMP"
waitkey 100
set fromcd 1
global drive @t
return
endif
if @downed==1&&@enuf==0
databegin
"You have more than 60MB free on this drive!
Press C if you would like to run from the CD, or
Press D to download the graphics to your hard disk for faster playback.
Please press either C or D now:"
dataend
window
color 0
clearscr
color 15
text @
flushkey
waitkey
getkey k
if @k=="d"||"D"
set fromcd 1
global drive @t
download ;go get the files...
return
endif
if @k=="c"||"C"
global drive @c
. chdir(@drive$"\\bigdemo")
return ;play as per normal
endif
endif
if @enuf==1&&@downed==1
global drive @c
. chdir(@drive$"\\bigdemo")
return ;play as per normal
endif
return
runmode:
if @fromcd==1
set thispath "\\mtdtemp\\"
endif
return
mp:
midpak volume 90
midpak use @c$"\\bigdemo\\"$@1$@ext
midpak play
return
playit:
dload @1 d1 1
putdff d1 0 0 0
mark (d1->frames)-1
putdff d1 @playspeed @loop @loop
waitkey 0
getkey k name
if @k==return
set broken 1
break playout
endif
loop
playout:
dfree d1
return
terminate:
when esc
digpak quit ;implicit loading
midpak stop
free digpak midpak
. chdir(@c$"\\spacebar")
exit
download:
video m
color 0
window
clearscr
color 15
exec c:\dos\xcopy.exe @c$"\\flics\\kohtz\*.fli "$@t$"\\mtdtemp"
video l
return
ckl:
CAM01A.FLI
CAM01B.FLI
CAM02.FLI
CAM03.FLI
CAM04.FLI
CAM05.FLI
CAM06.FLI
CAM07.FLI
CAM08A.FLI
CAM08B.FLI
end
kohtz: ;----- start of birdy
local t ""
set playspeed 3
global thispath @c$"\\flics\\kohtz\\"
runmode ;check in from CD or hard disk
mp camkohtz
databegin
_BUMP.raw
_CUC.raw
_DOOR.raw
_EYES.raw
_WINK.raw
_CHAIN.raw
_C2.raw
dataend
mark 7
load @c$"\\bigdemo\\"$@
loop
dload @thispath$"cam01a.fli" d1 1
putdff d1 0 0 0
mark (d1->frames)-1
putdff d1 @playspeed @loop @loop
if @loop==465 ;Reached frame 465
digpak preloaded @_door
digpak play
endif
waitkey 0
getkey k name
if @k==return
set broken 1
break kohtzout
endif
loop
dfree d1
digpak preloaded @_cuc
digpak play
playit @thispath$"cam01b.fli"
data 11 "_door" 111 "_cuc" 130 "_cuc"
set t @
dload @thispath$"cam02.fli" d1 1
putdff d1 0 0 0
mark (d1->frames)-1
putdff d1 @playspeed @loop @loop
if @loop==@t ;Reached frame 465
local t @ ;grab sfx
digpak preloaded @@t
digpak play
set t @
endif
waitkey 0
getkey k name
if @k==return
set broken 1
break kohtzout
endif
loop
dfree d1
playit @thispath$"cam03.fli"
dload @thispath$"cam04.fli" d1 1
data 6 "_eyes" 16 "_eyes"
dataend
local x @
putdff d1 0 0 0
mark (d1->frames)-1
putdff d1 @playspeed @loop @loop
if @loop==@x
local t @
digpak preloaded @@t
digpak play
set x @
endif
waitkey 0
getkey k name
if @k==return
set broken 1
break kohtzout
endif
loop
dfree d1
playit @thispath$"cam05.fli"
dload @thispath$"cam06.fli" d1 1
data 327 "_chain" 362 "_chain" 383 "_chain"
dataend
local x @
putdff d1 0 0 0
mark 402
putdff d1 @playspeed @loop @loop
if @loop==@x
local t @
digpak preloaded @@t
digpak play
set x @
endif
waitkey 0
getkey k name
if @k==return
set broken 1
break kohtzout
endif
loop ;at frame 402 now
digpak preloaded @_c2
digpak play
mark 45 ;from 402-447
putdff d1 @playspeed @loop+402 @loop+402
digpak done
if !@0
digpak play
endif
waitkey 0
getkey k name
if @k==return
set broken 1
break kohtzout
endif
loop
mark (d1->frames)-447 ;this isn't playing
putdff d1 @playspeed @loop+447 @loop+447
waitkey 0
getkey k name
if @k==return
set broken 1
break kohtzout
endif
loop
dload @thispath$"cam07.fli" d1 1
putdff d1 0 0 0
mark (d1->frames)-1
putdff d1 @playspeed @loop-1 @loop
if @loop==26
digpak preloaded @_bump
digpak play
endif
waitkey 0
getkey k name
if @k==return
set broken 1
break kohtzout
endif
loop
dfree d1
playit @thispath$"cam08a.fli"
digpak preloaded @_wink
digpak play
playit @thispath$"cam08b.fli"
kohtzout:
dfree d1
free _BUMP _CHAIN _C2 _EYES _WINK
return ;end of camkohtz